@extends('layout.template')

@section('title')
	{{ $title }}
@stop

@section('content')
	
<table class="table table-striped table-condensed table table-hover">
	<tr>		
		<th>Hour</th>
		<th>Offer_ID</th>
		<th>Clicks</th>
		<th>Conversions</th>
		<th>Conversion Rate</th>
		<th>Payout</th>
		
	</tr>
<?php
for ($i = 0; $i < $count; $i++) {

	if($result[$i]['hasoffers_conversions']/$result[$i]['hasoffers_clicks']*100 > 5){
	echo '<tr class="danger">';
	}	

		echo '<td>';
			echo $result[$i]['hasoffers_hour'];
		echo '</td>';

		echo '<td>';
			echo $result[$i]['hasoffers_offer_id'];
		echo '</td>';

		echo '<td>';
			echo $result[$i]['hasoffers_clicks'];
		echo '</td>';

		echo '<td>';
			echo $result[$i]['hasoffers_conversions'];
		echo '</td>';

		echo '<td>';
			echo number_format($result[$i]['hasoffers_conversions']/$result[$i]['hasoffers_clicks']*100,2).'%';
		echo '</td>';

		echo '<td>';
			echo number_format($result[$i]['hasoffers_payout'],2).'$';
		echo '</td>';

	echo '</tr>';
}
?>
</table>
@stop